<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>ngrok - 统一入口平台</title>
    <link href="https://cdn.staticfile.org/font-awesome/6.4.0/css/all.min.css" rel="stylesheet">
    <link href="https://cdn.staticfile.org/tailwindcss/2.2.19/tailwind.min.css" rel="stylesheet">
    <link href="https://fonts.googleapis.com/css2?family=Noto+Serif+SC:wght@400;500;600;700&family=Noto+Sans+SC:wght@300;400;500;700&display=swap" rel="stylesheet">
    <script src="https://cdn.jsdelivr.net/npm/mermaid@latest/dist/mermaid.min.js"></script>
    <style>
        body {
            font-family: 'Noto Sans SC', Tahoma, Arial, Roboto, "Droid Sans", "Helvetica Neue", "Droid Sans Fallback", "Heiti SC", "Hiragino Sans GB", Simsun, sans-serif;
            background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
            min-height: 100vh;
        }
        .hero-gradient {
            background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
        }
        .card-hover {
            transition: all 0.3s ease;
        }
        .card-hover:hover {
            transform: translateY(-5px);
            box-shadow: 0 20px 40px rgba(0,0,0,0.1);
        }
        .text-gradient {
            background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
            -webkit-background-clip: text;
            -webkit-text-fill-color: transparent;
        }
        .section-title {
            position: relative;
            padding-bottom: 1rem;
        }
        .section-title::after {
            content: '';
            position: absolute;
            bottom: 0;
            left: 0;
            width: 60px;
            height: 4px;
            background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
            border-radius: 2px;
        }
        .feature-icon {
            background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
            -webkit-background-clip: text;
            -webkit-text-fill-color: transparent;
        }
        .code-block {
            background: #1e293b;
            color: #e2e8f0;
            border-radius: 0.5rem;
            padding: 1rem;
            font-family: 'Courier New', monospace;
            position: relative;
            overflow-x: auto;
        }
        .code-block::before {
            content: '$';
            color: #94a3b8;
            margin-right: 0.5rem;
        }
        .mermaid {
            display: flex;
            justify-content: center;
            margin: 2rem 0;
        }
        .drop-cap {
            float: left;
            font-size: 4rem;
            line-height: 1;
            font-weight: 700;
            margin-right: 0.5rem;
            color: #667eea;
            font-family: 'Noto Serif SC', serif;
        }
        .highlight-box {
            background: linear-gradient(135deg, rgba(102, 126, 234, 0.1) 0%, rgba(118, 75, 162, 0.1) 100%);
            border-left: 4px solid #667eea;
            padding: 1.5rem;
            border-radius: 0.5rem;
            margin: 2rem 0;
        }
        @keyframes fadeInUp {
            from {
                opacity: 0;
                transform: translateY(30px);
            }
            to {
                opacity: 1;
                transform: translateY(0);
            }
        }
        .animate-fadeInUp {
            animation: fadeInUp 0.8s ease-out;
        }
    </style>
</head>
<body>
    <!-- Hero Section -->
    <section class="hero-gradient text-white py-20">
        <div class="container mx-auto px-6 text-center">
            <h1 class="text-5xl md:text-6xl font-bold mb-6 animate-fadeInUp">
                ngrok
            </h1>
            <p class="text-xl md:text-2xl mb-8 opacity-90 animate-fadeInUp" style="animation-delay: 0.2s;">
                统一入口平台，让本地服务瞬间触达全球
            </p>
            <div class="flex justify-center space-x-4 animate-fadeInUp" style="animation-delay: 0.4s;">
                <a href="https://ngrok.com/" target="_blank" class="bg-white text-purple-700 px-8 py-3 rounded-full font-semibold hover:bg-gray-100 transition duration-300">
                    <i class="fas fa-globe mr-2"></i>访问官网
                </a>
                <a href="#quick-start" class="border-2 border-white text-white px-8 py-3 rounded-full font-semibold hover:bg-white hover:text-purple-700 transition duration-300">
                    <i class="fas fa-rocket mr-2"></i>快速开始
                </a>
            </div>
        </div>
    </section>

    <!-- Introduction Section -->
    <section class="py-16 bg-white">
        <div class="container mx-auto px-6">
            <div class="max-w-4xl mx-auto">
                <p class="text-lg leading-relaxed text-gray-700">
                    <span class="drop-cap">n</span>grok 是一个为开发者设计的统一入口平台，通过安全的反向代理技术，将本地或内部网络的服务快速暴露到公网。它的主要用途是帮助开发者、测试人员和企业快速构建、测试和部署应用程序，目标用户包括前端/后端开发者、DevOps工程师、IoT设备管理者以及需要远程访问服务的团队。
                </p>
            </div>
        </div>
    </section>

    <!-- Problem Section -->
    <section class="py-16 bg-gray-50">
        <div class="container mx-auto px-6">
            <h2 class="text-3xl font-bold mb-8 section-title">它能解决什么问题</h2>
            <div class="grid md:grid-cols-3 gap-6">
                <div class="bg-white p-6 rounded-lg shadow-lg card-hover">
                    <div class="text-4xl mb-4 feature-icon">
                        <i class="fas fa-network-wired"></i>
                    </div>
                    <h3 class="text-xl font-semibold mb-3">本地服务访问难题</h3>
                    <p class="text-gray-600">本地服务无法直接被外部访问，调试Webhook或移动端应用时需要复杂配置。</p>
                </div>
                <div class="bg-white p-6 rounded-lg shadow-lg card-hover">
                    <div class="text-4xl mb-4 feature-icon">
                        <i class="fas fa-cogs"></i>
                    </div>
                    <h3 class="text-xl font-semibold mb-3">网络配置复杂</h3>
                    <p class="text-gray-600">传统网络设置涉及DNS、端口转发、VPN或防火墙规则，耗时且易出错。</p>
                </div>
                <div class="bg-white p-6 rounded-lg shadow-lg card-hover">
                    <div class="text-4xl mb-4 feature-icon">
                        <i class="fas fa-shield-alt"></i>
                    </div>
                    <h3 class="text-xl font-semibold mb-3">企业部署挑战</h3>
                    <p class="text-gray-600">在客户网络或IoT设备中部署API，需处理复杂的网络环境和安全策略。</p>
                </div>
            </div>
            <div class="highlight-box mt-8">
                <p class="text-gray-700">
                    <i class="fas fa-lightbulb text-yellow-500 mr-2"></i>
                    ngrok通过简单的命令或API，将本地服务映射为安全的公网URL，省去繁琐的网络配置，同时提供认证、负载均衡和流量监控等功能，让开发和部署更高效。
                </p>
            </div>
        </div>
    </section>

    <!-- Core Features Section -->
    <section class="py-16 bg-white">
        <div class="container mx-auto px-6">
            <h2 class="text-3xl font-bold mb-8 section-title">核心功能概述</h2>
            <div class="grid md:grid-cols-2 lg:grid-cols-3 gap-8">
                <div class="text-center">
                    <div class="w-20 h-20 mx-auto mb-4 bg-gradient-to-br from-purple-500 to-pink-500 rounded-full flex items-center justify-center text-white text-2xl">
                        <i class="fas fa-lock"></i>
                    </div>
                    <h3 class="text-xl font-semibold mb-3">安全隧道</h3>
                    <p class="text-gray-600">通过一条命令将本地服务暴露为公网URL，支持HTTP、TCP和TLS协议，自动处理TLS证书。</p>
                    <div class="code-block mt-4 text-sm">ngrok http 80</div>
                </div>
                <div class="text-center">
                    <div class="w-20 h-20 mx-auto mb-4 bg-gradient-to-br from-blue-500 to-cyan-500 rounded-full flex items-center justify-center text-white text-2xl">
                        <i class="fas fa-traffic-light"></i>
                    </div>
                    <h3 class="text-xl font-semibold mb-3">流量管理</h3>
                    <p class="text-gray-600">支持OAuth、IP限制、Webhook验证等策略，保护服务安全并优化流量分配。</p>
                </div>
                <div class="text-center">
                    <div class="w-20 h-20 mx-auto mb-4 bg-gradient-to-br from-green-500 to-teal-500 rounded-full flex items-center justify-center text-white text-2xl">
                        <i class="fas fa-chart-line"></i>
                    </div>
                    <h3 class="text-xl font-semibold mb-3">实时监控</h3>
                    <p class="text-gray-600">内置流量检查器，提供请求/响应的实时分析，帮助调试和优化。</p>
                </div>
                <div class="text-center">
                    <div class="w-20 h-20 mx-auto mb-4 bg-gradient-to-br from-orange-500 to-red-500 rounded-full flex items-center justify-center text-white text-2xl">
                        <i class="fas fa-balance-scale"></i>
                    </div>
                    <h3 class="text-xl font-semibold mb-3">负载均衡</h3>
                    <p class="text-gray-600">通过端点池实现动态负载均衡，支持蓝绿部署和故障转移。</p>
                </div>
                <div class="text-center">
                    <div class="w-20 h-20 mx-auto mb-4 bg-gradient-to-br from-indigo-500 to-purple-500 rounded-full flex items-center justify-center text-white text-2xl">
                        <i class="fas fa-code"></i>
                    </div>
                    <h3 class="text-xl font-semibold mb-3">SDK与API集成</h3>
                    <p class="text-gray-600">提供Python、Go、Rust等SDK，以及全面的API，方便嵌入现有工作流。</p>
                </div>
            </div>
            <div class="highlight-box mt-8">
                <p class="text-gray-700 font-semibold">
                    <i class="fas fa-question-circle text-purple-500 mr-2"></i>
                    思考：你的项目是否需要快速将本地服务暴露给外部用户或设备？ngrok的流量监控能否帮助你发现潜在的性能瓶颈？
                </p>
            </div>
        </div>
    </section>

    <!-- Architecture Diagram -->
    <section class="py-16 bg-gray-50">
        <div class="container mx-auto px-6">
            <h2 class="text-3xl font-bold mb-8 section-title">工作原理</h2>
            <div class="bg-white p-8 rounded-lg shadow-lg">
                <div class="mermaid">
                    graph LR
                        A[本地服务<br/>localhost:3000] -->|ngrok代理| B[ngrok隧道]
                        B --> C[ngrok云服务]
                        C --> D[公网URL<br/>https://xxx.ngrok.app]
                        E[外部用户] --> D
                        D --> C
                        C --> B
                        B --> A
                        style A fill:#f9f,stroke:#333,stroke-width:2px
                        style D fill:#9f9,stroke:#333,stroke-width:2px
                        style C fill:#99f,stroke:#333,stroke-width:2px
                </div>
            </div>
        </div>
    </section>

    <!-- Use Cases Section -->
    <section class="py-16 bg-white">
        <div class="container mx-auto px-6">
            <h2 class="text-3xl font-bold mb-8 section-title">使用场景</h2>
            <div class="space-y-6">
                <div class="bg-gradient-to-r from-purple-50 to-pink-50 p-6 rounded-lg border-l-4 border-purple-500">
                    <h3 class="text-xl font-semibold mb-3 flex items-center">
                        <i class="fas fa-webhook text-purple-500 mr-3"></i>
                        Webhook调试
                    </h3>
                    <p class="text-gray-700 mb-3">开发者在本地开发时，需测试来自Stripe或GitHub的Webhook。</p>
                    <div class="code-block text-sm">ngrok http 3